<html>
<head>
    <title>JNDI Demo WebApp</title>
    <meta content="no-cache" http-equiv="Pragma">
    <meta content="no-cache,no-store" http-equiv="Cache-Control">
    <link href="demo.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="topnav">
    <a class="menu" href="http://localhost:8080/">Demo Home</a>
    <a class="menu"
       href="https://github.com/jetty/jetty.project/tree/jetty-12.0.x/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-jndi-webapp/">Source</a>
    <a class="menu" href="https://jetty.org/">Jetty Project Home</a>
    <a class="menu" href="https://jetty.org/docs/">Documentation</a>
    <a class="menu" href="https://webtide.com">Commercial Support</a>
</div>

<div class="content">
    <center>
        <span style="color:red; font-style:italic; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
    </center>
    <h1>Eclipse Jetty JNDI Demo Webapp</h1>
    <p>
        This is a demo webapp for the <a href="https://jetty.org/">Eclipse Jetty HTTP Server and Servlet Container</a>.
        It was added into your <code>$JETTY_BASE/webapps</code> directory.
    </p>

    <p>
        It shows how to configure and lookup resources such as <code>javax.sql.DataSource</code>, a JTA transaction
        manager and a <code>java.mail.Session</code> in JNDI.
    </p>

    <h2>Preparation</h2>
    <p>To use JNDI in a base jetty instance enable the <code>jndi</code> module:
    <pre>
     $ cd $JETTY_BASE
     $ java -jar $JETTY_HOME/start.jar --add-module=jndi
         </pre>
    </p>
    <p>
        The jetty <code>demo</code> module pre-enables JNDI along with some mock resources used by this demo.
    </p>

    <h2>Execution</h2>
    <p>
        Click <code>Test</code> to check the runtime lookup of the JNDI resources.
    </p>
    <form action="test" method="post">
        <button class="test" type="submit">Test</button>
    </form>
</div>

<div class="footer">
    <center><a href="https://eclipse.dev/jetty"><img src="small_powered_by.gif" style="border:0"/></a></center>
</div>


</body>
</html>
